<?php
namespace Home\Model;
use Think\Model;

/**
 * 商品表模型
 */
class ProductModel extends BaseModel {

    protected $tableName = 't_product';

    /**
     * 根据商品id查询商品信息
     * @author cheng
     */
    public function getProductInfo($id) {
        $data = $this->where(array('F_PRODUCT_ID' => $id))->find();
        return $data;
    }

    /**
     * @desc: 获取注册套餐列表
     * @Author: delayhsiao
     * @update: 2016-11-29
     **/
    public function queryPaySetMeal( $status = '' ){
    	$where = '`F_LOCAL_PRODUCT_TYPE`=3';

//    	if ($status != ''){
//            $where .=' AND `F_PRODUCT_ID` > 3';
//        }

    	$setmeal = $this->where($where)
			->field('
				F_PRODUCT_ID as productId,
				F_PRODUCT_NAME as productName,
				F_PRODUCT_PRICE as productPrice
			')
			->select();

    	return $setmeal;
	}
}
